//
//  HJXBottomBtn.m
//  Catus
//
//  Created by 晓梦影 on 16/4/18.
//  Copyright © 2016年 黄金星. All rights reserved.
//

#import "HJXBottomBtn.h"

@interface HJXBottomBtn()

/** 按钮底下灰色的条*/
@property (nonatomic, weak) UIView *grayV;

@end
@implementation HJXBottomBtn


- (instancetype)initWithFrame:(CGRect)frame
{
   self = [super initWithFrame:frame];
    
    UIView *grayV = [[UIView alloc]init];
    grayV.backgroundColor = [UIColor grayColor];
    grayV.alpha = 0.1;
    [self addSubview:grayV];
    self.grayV = grayV;
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    float imageVX = self.width * 0.1;
    float imageVY = self.height * 0.3;
    float imageVW = self.width * 0.1;
    float imageVH = self.height - imageVY * 2;
    self.imageView.frame = CGRectMake(imageVX, imageVY, imageVW, imageVH);
    
    float titleLX = imageVX +imageVW + 8;
    float titleLY = imageVY;
    float titleLW = self.width - titleLX;
    float titleLH = self.height - titleLY * 2;
    self.titleLabel.frame = CGRectMake(titleLX, titleLY, titleLW, titleLH);
    
    self.grayV.frame = CGRectMake(5, self.height - 1, self.width - 10, 1);
    
}

@end
